package test;

import java.util.*;

public class ArrayListB {

	

	public static void main(String[] args) throws InterruptedException {

//		List<Integer> list = ArrayList<Integer>(Arrays.asList(1,2,3,4,5,6));
//		
//		list.add(7);
//		
//		System.out.println(list);
		
		Set<Integer> set = new HashSet<>();
		Integer i1 = 45;
		Integer i2 = 46;
		set.add(i1);
		set.add(i2);System.out.println(set.size() + " ");
		set.remove(i1); System.out.println(set.size() + " ");
		i2 = 47;
		System.out.println(set.size() + " ");
		
	
		waitForSignal();
		
		
	}
	
	static void waitForSignal() throws InterruptedException{
		Object obj  = new Object();
		synchronized (Thread.currentThread()){
			obj.wait();
			obj.notify();
		}
	}

}
